package com.study.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class HelloController {

    //http://localhost:8080/hello
    @RequestMapping("/hello")
    public String hello(Model model){
        model.addAttribute("msg","hello,spring");
        return "hello";//会被视图解析器解析对应的视图
    }

}
